<template>
  <scroll-view
    v-if="Object.values(data).length"
    scroll-y="true"
    class="content"
  >
    <view class="list-item">
      <view class="item">
        <view class="item-title"> 单据编号： {{ data.billNo }} </view>
        <view class="detail">
          <text>
            <text class="font-bold">单据类型：</text> {{ data.billTypeName }}
          </text>
          <view>
            <text class="font-bold">消息类型: </text>
            {{ data.messageTypeName }}</view
          >
          <view>
            <text class="font-bold">消息内容: </text>
            {{ data.messageContent }}</view
          >
          <view>
            <text class="font-bold">发送人: </text>
            {{ data.senderName }}</view
          >
          <view>
            <text class="font-bold">时间： </text> {{ data.createTime }}</view
          >
        </view>
      </view>
    </view>
  </scroll-view>

  <view v-else class="no-data"> 暂无数据 </view>
</template>
  
  <script>

import request from "@/utils/httpInterceptor";

export default {
  data() {
    return {
      data: {},
      columns: [],
      tableData: [],
      number: "",
    };
  },

  computed: {},
  onLoad: function (option) {
    uni.setNavigationBarTitle({
      title: option?.billTypeName || "详情",
    });
    this.data = JSON.parse(option.itemData);
    this.redMessage()
  },

  methods: {
    async redMessage() {
     await request({
        url: `/user/message/${this.data.id}`,
        method: "GET",
      });
    },
  },
};
</script>
  
  <style lang="scss" scoped>
.action-number {
  padding: 0 10px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  position: fixed;
  bottom: 45px;
  width: 100%;
  border-top: 1px solid #eee;
  height: 35px;
  align-items: center;
}
</style>
  